﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Hello World! with SignalR</title>
    <script src="./Scripts/jquery-1.10.2.min.js"></script>
    <script src="./Scripts/jquery.signalR-2.1.2.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var persistent = $.connection('/echo');

            persistent.received(function (data) {
                $('#AddText').append(data);
            });

            persistent.start().done(function () {
                $('#SubmitButton').click(function () {
                    persistent.send("Hello World Clicked");
                });
            });
        });
    </script>
</head>
<body>
    <div id="AddText"></div>
    <input type="button" id="SubmitButton" value="Say Hello" />
</body>
</html>